package com.qianqian.service.service.wxcpapi;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.qianqian.service.model.wxcp.message.WxCpMessage;

public class WxCpMessageService {


    WxCpRequestService wxCpRequestService;
    public WxCpMessageService(WxCpRequestService wxCpRequestService){
        this.wxCpRequestService = wxCpRequestService;
    }

    public JSONObject sendBaseMessage(WxCpMessage wxCpMessage){
        wxCpMessage.setAgentid(wxCpRequestService.getAgentId());
        return wxCpRequestService.post("message/send",JSON.toJSONString(wxCpMessage));

    }
    public JSONObject sendMessage(WxCpMessage wxCpMessage){
        wxCpMessage.setAgentid(wxCpRequestService.getAgentId());
        return wxCpRequestService.post("message/send",JSON.toJSONString(wxCpMessage));
    }

}
